package com.yq.cns.adapter

import com.chad.library.adapter.base.BaseProviderMultiAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.yq.cns.adapter.newsitem.DlfTransverseItemProvider
import com.yq.cns.adapter.newsitem.LargeVideoNewsItemProvider
import com.yq.cns.adapter.newsitem.TextNewsItemProvider
import com.yq.cns.entity.NewsListEntity

class NewsListAdapter : BaseProviderMultiAdapter<NewsListEntity>(), LoadMoreModule {

    init {
        addItemProvider(TextNewsItemProvider())
        addItemProvider(LargeVideoNewsItemProvider())
        addItemProvider(DlfTransverseItemProvider())
    }

    override fun getItemType(data: List<NewsListEntity>, position: Int) = data[position].itemType


}